package com.learn.designPatterns.structuralType.adapter;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-26 16:12
 */
public class TurkeyAdapter implements Duck{

    private Turkey turkey;

    public TurkeyAdapter(Turkey turkey) {
        this.turkey = turkey;
    }

    @Override
    public void quack() {
        if (turkey != null)
            turkey.gobble();
    }
}
